package com.along.textdemo;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.along.textdemo.view.CirCleBarView;

/**
 * 自定义进度条
 */
public class ProgressViewActivity extends AppCompatActivity {

    private CirCleBarView progressView;
    private int progress = 0;
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_progress);

        progressView = findViewById(R.id.progress_1);
        new Thread(new Runnable() {
            @Override
            public void run() {

                while(progress < 100) {
                    progress += 5;
                    progressView.setProgress(progress);

                    try {
                        Thread.sleep(100);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }).start();

}
    }